Optimal. Leaf size=103 \[ -\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac {f x^2}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {1663, 1657, 634, 618, 206, 628} \[ -\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac {f x^2}{2 c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 1657
Rule 1663
Rubi steps
\begin {align*} \int \frac {x \left (d+e x^2+f x^4\right )}{a+b x^2+c x^4} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {d+e x+f x^2}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {f}{c}+\frac {c d-a f+(c e-b f) x}{c \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {f x^2}{2 c}+\frac {\operatorname {Subst}\left (\int \frac {c d-a f+(c e-b f) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c}\\ &=\frac {f x^2}{2 c}+\frac {(c e-b f) \operatorname {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}+\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \operatorname {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}\\ &=\frac {f x^2}{2 c}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}-\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^2}\\ &=\frac {f x^2}{2 c}-\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 100, normalized size = 0.97 \[ \frac {\frac {2 \tan ^{-1}\left (\frac {b+2 c x^2}{\sqrt {4 a c-b^2}}\right ) \left (-c (2 a f+b e)+b^2 f+2 c^2 d\right )}{\sqrt {4 a c-b^2}}+(c e-b f) \log \left (a+b x^2+c x^4\right )+2 c f x^2}{4 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.34, size = 318, normalized size = 3.09 \[ \left [\frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} f x^{2} - {\left (2 \, c^{2} d - b c e + {\left (b^{2} - 2 \, a c\right )} f\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c + {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) + {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e - {\left (b^{3} - 4 \, a b c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, \frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} f x^{2} - 2 \, {\left (2 \, c^{2} d - b c e + {\left (b^{2} - 2 \, a c\right )} f\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e - {\left (b^{3} - 4 \, a b c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.78, size = 99, normalized size = 0.96 \[ \frac {f x^{2}}{2 \, c} - \frac {{\left (b f - c e\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{2}} + \frac {{\left (2 \, c^{2} d + b^{2} f - 2 \, a c f - b c e\right )} \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.00, size = 211, normalized size = 2.05 \[ -\frac {a f \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}+\frac {b^{2} f \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}\, c^{2}}-\frac {b e \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}\, c}+\frac {f \,x^{2}}{2 c}+\frac {d \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-\frac {b f \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{4 c^{2}}+\frac {e \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{4 c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.83, size = 1081, normalized size = 10.50 \[ \frac {f\,x^2}{2\,c}+\frac {\ln \left (c\,x^4+b\,x^2+a\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}+\frac {\mathrm {atan}\left (\frac {2\,c^2\,\left (4\,a\,c-b^2\right )\,\left (x^2\,\left (\frac {\frac {\left (\frac {6\,f\,b^2\,c^2-6\,e\,b\,c^3+4\,d\,c^4-4\,a\,f\,c^3}{c^2}+\frac {4\,b\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{8\,c^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}}{a}-\frac {b\,\left (\frac {b^3\,f^2-2\,b^2\,c\,e\,f+b\,c^2\,e^2+d\,b\,c^2\,f-a\,b\,c\,f^2-d\,c^3\,e+a\,c^2\,e\,f}{c^2}+\frac {\left (\frac {6\,f\,b^2\,c^2-6\,e\,b\,c^3+4\,d\,c^4-4\,a\,f\,c^3}{c^2}+\frac {4\,b\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}-\frac {b\,{\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}^2}{2\,c^2\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )-\frac {\frac {\left (\frac {8\,a\,c^3\,e-8\,a\,b\,c^2\,f}{c^2}-\frac {8\,a\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{8\,c^2\,\sqrt {4\,a\,c-b^2}}-\frac {a\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}}{a}+\frac {b\,\left (\frac {\left (\frac {8\,a\,c^3\,e-8\,a\,b\,c^2\,f}{c^2}-\frac {8\,a\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}-\frac {a\,b^2\,f^2-2\,a\,b\,c\,e\,f+a\,c^2\,e^2}{c^2}+\frac {a\,{\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}^2}{c^2\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )}{4\,a^2\,c^2\,f^2-4\,a\,b^2\,c\,f^2+4\,a\,b\,c^2\,e\,f-8\,a\,c^3\,d\,f+b^4\,f^2-2\,b^3\,c\,e\,f+4\,b^2\,c^2\,d\,f+b^2\,c^2\,e^2-4\,b\,c^3\,d\,e+4\,c^4\,d^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{2\,c^2\,\sqrt {4\,a\,c-b^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________